/**
 * 
 */
package com.trungkent.smsbackup.components;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.Checkable;
import android.widget.ImageView;

/**
 * @author setamember
 *
 */
public class ImageViewCheckable extends ImageView implements Checkable {
	
	boolean isChecked;
	
	public ImageViewCheckable(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	@Override
	public boolean isChecked() {
		return isChecked;
	}

	@Override
	public void setChecked(boolean checked) {
		isChecked = checked;
	}

	@Override
	public void toggle() {
		if(isChecked) {
			setChecked(false);
		} else {
			setChecked(true);
		}
	}

}
